#include"Deque.h"

int main(int argc, char** argv)
{
	cout << "Enter lines of text and the program doubly dupicates them," << endl;
	cout << "Use Ctrl-Z(EOF) to terminate the program." << endl;
	Deque q;
	char c;
	while ((c = cin.get()) != '\n')
	{
		q.append_front(c);
		q.append_rear(c);
	}
	while (!q.empty())
	{
		q.retrieve_front(c);
		cout << c;
		q.retrieve_rear(c);
		cout << c;
		q.serve_front();
		q.serve_rear();
	}
	cout << endl;
	return 0;
}